Considering the problems of low-enthusiasm workers and task expiration in the mobile crowd sensing system, a task assignment algorithm based on initial cost and soft time window was proposed. As the corresponding task assignment problem belongs to the category of NP-hard problems and the computationally efficient optimal algorithm cannot be found, thus, an algorithm was developed based on Discrete Cuckoo Search Algorithm (DCSA). Firstly, the corresponding global search process and local search process were designed respectively according to the problem characteristics. Secondly, to derive the better solution, the priorities of tasks with respect to the distance between tasks and workers' starting positions as well as the size of time windows were analyzed. Finally, feasible operations were executed to guarantee that the related constraints were satisfied by each task assignment. Compared with genetic algorithm and greedy algorithm, the simulation results show that DCSA-based task assignment algorithm can improve the enthusiasm of workers to participate, solve the problem of task expiration, and ultimately reduce the total system cost.